﻿namespace RuoVea.Swms.Server.Models;

/// <summary>
/// 入库记录
/// </summary>
[SugarTable(nameof(WmsStockIn), "入库记录")]
public class WmsStockIn : EntityBase
{
    /// <summary>
    /// 产品编码
    /// </summary>
    [SugarColumn(ColumnDescription = "产品编码", IsNullable = false, Length = 20)]
    public long ProductId { get; set; }

    /// <summary>
    /// 入库日期
    /// </summary>
    [SugarColumn(ColumnDescription = "入库日期", IsNullable = false)]
    public DateTime InDate { get; set; }

    /// <summary>
    /// 入库数量
    /// </summary>
    [SugarColumn(ColumnDescription = "入库数量", IsNullable = false)]
    public int Quantity { get; set; }

    /// <summary>
    /// 操作人
    /// </summary>
    [SugarColumn(ColumnDescription = "操作人", IsNullable = false, Length = 50)]
    public string Operator { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    [SugarColumn(ColumnDescription = "备注", IsNullable = true)]
    public string Remark { get; set; }

    /// <summary>
    /// 产品信息（导航属性）
    /// </summary>
    [Navigate(NavigateType.OneToOne, nameof(ProductId))]
    public WmsProduct Product { get; set; }
}
